<%-- 
    Document   : editar.ok
    Created on : 28/09/2008, 16:23:43
    Author     : Diego
--%>

<%@page pageEncoding="ISO-8859-1" contentType="text/html"%>
<%@ taglib prefix="display" uri="http://displaytag.sf.net" %>
<%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" href="/byblos/css/menu.css" type="text/css" />
        <link rel="stylesheet" href="/byblos/css/estrutura.css" type="text/css" />
        <link rel="stylesheet" href="/byblos/css/displaytag.css" type="text/css" />
        <script type="text/javascript" src="/byblos/fckeditor/fckeditor.js"></script>
        <link rel="stylesheet" href="/byblos/css/estruturamenu.css" type="text/css" />
         <script type="text/javascript" language="Javascript1.1" src="/byblos/script/menuAdm.js"></script>
        <title>NewsLetter</title>
        <script>
            function setValue(target) {
                var valor = target.checked;
                target.value = valor;
            }
            
            function enviar(){
                var formulario = document.getElementById("formulario");
                formulario.action = "/byblos/maladireta.selecionar.logic";
                formulario.submit();
            }
            
            function salvar(){
                var formulario = document.getElementById("formulario");
                formulario.action = "/byblos/maladireta.salvar.logic";
                formulario.submit();
            }
            
            function enviarsalvar(){
                var formulario = document.getElementById("formulario");
                formulario.action = "/byblos/maladireta.enviarsalvar.logic";
                formulario.submit();
            }
        </script>
    </head>
    <body>
        <%@ include file="/site/menuidiomaadm.jsp" %>
        <%@ include file="/byblos/menu.jsp" %>
        <div style="padding:0px 0px 0px 180px">
            <h1>NewsLetter</h1>
            <form id="formulario" method="post" ENCTYPE='multipart/form-data'>
                <input type="hidden" name="idMsg" value="${malaDireta.id}">
                <br>
                <br>
                <br>Adicionar Foto <input type="file" name="foto" value=""/>&nbsp;&nbsp;&nbsp <input type="button" value=" Ok! " onclick="salvar()">
                <c:if test="${malaDireta.imagem != null}">
                    <br><br>   
                    <img src="${malaDireta.imagem}" width="100" height="100" >
                    <br>
                </c:if>
                <br>
                Assunto
                <br><input type="text" name="assunto" style="width:300px" value="${malaDireta.assunto}" />
                <br>
                <br>
                <h3>Mensagem</h3>
                <script type="text/javascript"> 
                    var oFCKeditor = new FCKeditor( 'mensagem' ) ;
                    oFCKeditor.BasePath	= '/byblos/fckeditor/' ;
                    oFCKeditor.Height	= 300 ;                    
                    oFCKeditor.Width	= 800;  
                    oFCKeditor.Value	= '${malaDireta.mensagem}'
                    oFCKeditor.Create() ;
                    //--> 
                </script>
                <br>
                <br><input type="button" value="Enviar" onclick="enviar()"> | <input type="button" value="Salvar" onclick="salvar()">
            </form>
        </div>
    </body>
</html>
